using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace LigerMVC.Entities.Mapping
{
    public class Sys_MenuControllerMap : EntityTypeConfiguration<Sys_MenuController>
    {
        public Sys_MenuControllerMap()
        {
            // Primary Key
            this.HasKey(t => t.MenuControllerID);

            // Properties
            this.Property(t => t.MenuNo)
                .HasMaxLength(50);

            this.Property(t => t.Controller)
                .HasMaxLength(100);

            this.Property(t => t.ActionMembers)
                .HasMaxLength(400);

            // Table & Column Mappings
            this.ToTable("Sys_MenuController");
            this.Property(t => t.MenuControllerID).HasColumnName("MenuControllerID");
            this.Property(t => t.MenuNo).HasColumnName("MenuNo");
            this.Property(t => t.Controller).HasColumnName("Controller");
            this.Property(t => t.ActionMembers).HasColumnName("ActionMembers");
        }
    }
}
